const util = require("util")
const fs = require("fs")
const exists = util.promisify(fs.exists)
const mkdir = util.promisify(fs.mkdir)

/** 
 * 暂时失效
 */
async function dirExCreate(path) {
	if (typeof path == "string") {
		let isExist = await exists(path)
		if (!isExist) {
			await mkdir(path)
			return true
		} else
			return false
	} else {
		console.error(arguments)
		return false
	}
}
module.exports = {dirExCreate, exists}